<?php
/**
 * Created by PhpStorm.
 * User: sks
 * Date: 2015/12/15
 * Time: 13:49
 */

class Involved_CompanyModel extends BaseModel{

    protected $table = 'company';

  public function SelComName()
  {
        return DB::table($this->table)
            ->select('company_id','company_name')
            ->get();
  }
    public function CompanyList()
    {
        return DB::table($this->table)
            ->select()
            ->get();
    }
    public function GetCompanyId($company_id)
    {
        return DB::table($this->table)
            ->select()
            ->where('company_id',$company_id)
            ->first();
    }

    public function CompanyInfo($name){
        return DB::table($this->table)
            ->select('plate','rank')
            ->where('company_name',$name)
            ->first();
    }
}